function gitbnew
    set branch_name (git branch 2> /dev/null | grep \* | sed 's/* //')
    if [ "$branch_name" != "master" ]
        echo "is not master!!!"
        return
    end

    if count $argv >/dev/null
      git checkout -b $argv[1]
    else
      echo 'usage: gitbnew <branch name>'
    end
end
